Release 10.1A: OpenEdge Development:
Programming Interfaces
Representing temp-tables in XML Schema
Temp-tables are represented with an XML Schema element definition, followed by a complex type definition defining the fields. The XML Schema name attribute identifies the name of the temp-table. The following Progress-specific XML Schema attributes further describe the temp-table:
Temp-table fields can be represented as elements, attributes or text in an XML Document. The
XML-NODE-TYPEattribute on the buffer-field object lets you control how fields are represented in the XML document and the XML Schema.XML Schema provides the following built-in attributes for minimally describing a temp-table field in an element definition (when the buffer-field has an
XML-NODE-TYPEof"ELEMENT"):
name— name of the field.type— data type of the field.minOccurs/maxOccurs— extent of array fields.nillable— can be null or unknown (always has a value of"true"for temp-table fields). Unknown fields havexsi:nilattribute set to"true"in the XML instance.default— the initial value for the field. If the field has the default initial value for it's data type (for example,0for integer), the attribute will not be present in the XML Schema.XML Schema provides the following attributes for attribute definitions (when the buffer-field has a
XML-NODE-TYPEof"ATTRIBUTE"):XML Schema provides the following attribute for simple content definitions (when the Buffer-field has a
XML-NODE-TYPEof"TEXT"):
Notes: If you want to be able to explicitly set a field to the Unknown value (type— data type of the field.?) (xsi:nil="true"), it must haveXML-NODE-TYPE = "ELEMENT"
Array fields must haveXML-NODE-TYPE = "ELEMENT"or"HIDDEN"
Buffer fields withXML-NODE-TYPE="TEXT"cannot be part of a nestedDATA-RELATION.Progress provides the following XML Schema extensions for describing Progress-specific attributes of a temp-table field. These attributes, with the exception of
dataTypeandinitial, will only appear in the XML Schema when themin-xmlschemaoption forWRITE-XML()method orWRITE-XMLSCHEMA()method isFALSE.
Table 22–8: Progress XML Schema extensions for temp-table fields XML Schema attribute Description Case-sensitive forCHARACTERfields Column-codepage forCLOBfields Column-label for the field The Progress data type for fields where the XML Schema type attribute maps to multiple Progress data types (for example,string,base64Binary,dateTime). See Appendix D "XML Reference of Data Type and Code Page mappings." Number of decimal places forDECIMALfields Display format for the field Name of the field. Used only for fields withXML-NODE-TYPEof"TEXT" Help text for the field Initial value for the field. Used for fields withXML-NODE-TYPEof"TEXT", and for fields with initial value ofTODAY,NOWorUNKNOWN. Label for the field Read-only attribute for the field Position of the field in the temp-table. This attribute is used only when there's a mix of fields withXML-NODE-TYPEof"ELEMENT"and"ATTRIBUTE"in the temp-table.Note: If any of the above Progress-specific field attributes have the Progress default value,
WRITE-XML()method andWRITE-XMLSCHEMA()method will omit the attribute from the element or attribute definition when it writes the XML Schema.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |